﻿Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
<System.Web.Script.Services.ScriptService()>
<ToolboxItem(False)> _
Public Class Slideshow
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function GetSlides() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Tempest/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Tempest/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides2() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Boss/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Boss/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides3() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Chevelle SS/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Chevelle SS/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides4() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/COPO Chevelle/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/COPO Chevelle/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides5() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Corvette/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Corvette/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides6() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/GSX_Stage1/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/GSX_Stage1/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides7() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Plymouth/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Plymouth/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides8() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Shelby/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Shelby/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides9() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/Z28 Camaro/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/Z28 Camaro/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

    <WebMethod()> _
    Public Function GetSlides10() As AjaxControlToolkit.Slide()
        Dim imgSlide(3) As AjaxControlToolkit.Slide

        Dim i As Integer
        Dim imagenames() As String = System.IO.Directory.GetFiles(Server.MapPath("~/Images/XL/ZL1 Camaro/"))
        Dim photos() As AjaxControlToolkit.Slide = New AjaxControlToolkit.Slide(imagenames.Length) {}

        For i = 0 To imagenames.Length - 1 Step i + 1
            Dim file() As String = imagenames(i).Split("\\")
            photos(i) = New AjaxControlToolkit.Slide("Images/XL/ZL1 Camaro/" + file(file.Length - 1), file(file.Length - 1), "")
        Next
        Return photos
    End Function

End Class